package pers.qianyu.month_202101.date_20210116;

import pers.qianyu.util.model.*;

/**
 * 237. 删除链表中的节点
 * https://leetcode-cn.com/problems/delete-node-in-a-linked-list/
 *
 * @author mizzle rain
 * @date 2021-01-16 22:58
 */
public class DeleteNode {
    public void deleteNode(ListNode node) {
        ListNode next = node.next;
        node.val = next.val;
        node.next = next.next;
        next.next = null;
    }
}
